package com.jeff

class DateTagLib {
	static namespace = 'trip'
	
	def thisYear = {
		out << Calendar.getInstance().get(Calendar.YEAR)
	}
	
	def copyright = {attr, body ->
		out << "<div id='copyright'>"
		out << "&copy; ${attr['startYear']} - $thisYear, ${body()} " //reuse "thisYear", should not make it as ${thisYear()},
																	//"body" is a closure so should be used with "()"
		out << "All Rights Reserved"
		out << "</div>"
	}
}
